using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ibba.agil.core;
using ibba.agil.core.common;

namespace ibba.agil.data.data
{
    public class tbagi026CatlErro_ENT : EntityData, IDataEntity
    {
        private manager.tbagi026CatlErro_MNG _manager;

        #region Data

        public int codCatlErro { get; set; }
        public int codTipoRetoCtro { get; set; }
        public string desCatlErro { get; set; }
        public string txtMensSolu { get; set; }
        public string indExibMensUsua { get; set; }


        #endregion

        /// <summary>
        /// Construtor necessario para configura��o dos mapeamentos :: Entidade < -- > TABELA
        /// </summary>
        public tbagi026CatlErro_ENT()
        {
            // determina o mapeamento entre a tabela e entidade
            base.MapperTable = new Dictionary<string, string>() { { this.GetType().Name, "dbo.TBAGI026_CATL_ERRO" } };

            // determina o mapeamento entre a coluna da tabela e propriedade
            base.Mapper = new Dictionary<string, string>() { 
                     {"codCatlErro", "COD_CATL_ERRO"    }, 
                     {"codTipoRetoCtro", "COD_TIPO_RETO_CTRO"    }, 
                     {"desCatlErro", "DES_CATL_ERRO"    }, 
                     {"txtMensSolu", "TXT_MENS_SOLU"    }, 
                     {"indExibMensUsua", "IND_EXIB_MENS_USUA"    }          
            };

            // determina o mapeamento das chaves
            base.MapperKeys = new Dictionary<string, string>() { 
                    //DictionaryEntityKey//
                     {"codCatlErro", "COD_CATL_ERRO"    }    
            };

            // determina se a chave � identity
            //base.MapperKeyIsNotIdentity = false;

            // instancia o manager
            _manager = new manager.tbagi026CatlErro_MNG();
        }

        public override void Save()
        {
            _manager.Save(this);
        }

        public override void Save(TransactionManager transactionContext)
        {
            _manager.Save(this, transactionContext);
        }

        public override void Delete()
        {
            _manager.Delete(this);
        }

        public override void Delete(TransactionManager transactionContext)
        {
            throw new NotImplementedException();
        }
    }
}
